<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--[if IE 6]><html class="ie6" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if IE 7]><html class="lt-ie8 lt-ie9" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml"><!--<![endif]-->
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=1" />
  <meta name="referrer" content="origin" />
  <meta name="HandheldFriendly" content="true" />
  <meta name="robots" content="noindex, nofollow" />
  <title>site:stackoverflow.com create tar archive at DuckDuckGo</title>
  <link title="DuckDuckGo (HTML)" type="application/opensearchdescription+xml" rel="search" href="/opensearch_html.xml" />
  <link href="/favicon.ico" rel="shortcut icon" />
  <link rel="apple-touch-icon" href="/assets/logo_icon128.v101.png"/>
  <link rel="image_src" href="/assets/logo_homepage.normal.v101.png"/>  
  <link type="text/css" media="handheld, all" href="/h1905.css" rel="stylesheet" />
</head>

<body class="body--html">
  <a name="top" id="top"></a>

  <form action="/html/" method="post">
    <input type="text" name="state_hidden" id="state_hidden" />
  </form>

  <div>
    <div class="site-wrapper-border"></div>

    <div id="header" class="header cw header--html">
        <a title="DuckDuckGo" href="/html/" class="header__logo-wrap"></a>


    <form name="x" class="header__form" action="/html/" method="post">

      <div class="search search--header">
          <input name="q" autocomplete="off" class="search__input" id="search_form_input_homepage" type="text" value="site:stackoverflow.com create tar archive" />
          <input name="b" id="search_button_homepage" class="search__button search__button--html" value="" title="Search" alt="Search" type="submit" />
      </div>


        
    
      <input name="t" value="hj" type="hidden">
        
        
        
        

    <div class="frm__select">
      <select name="kl">
      
        <option value="" >All Regions</option>
      
        <option value="ar-es" >Argentina</option>
      
        <option value="au-en" >Australia</option>
      
        <option value="at-de" >Austria</option>
      
        <option value="be-fr" >Belgium (fr)</option>
      
        <option value="be-nl" >Belgium (nl)</option>
      
        <option value="br-pt" >Brazil</option>
      
        <option value="bg-bg" >Bulgaria</option>
      
        <option value="ca-en" >Canada</option>
      
        <option value="ca-fr" >Canada (fr)</option>
      
        <option value="ct-ca" >Catalonia</option>
      
        <option value="cl-es" >Chile</option>
      
        <option value="cn-zh" >China</option>
      
        <option value="co-es" >Colombia</option>
      
        <option value="hr-hr" >Croatia</option>
      
        <option value="cz-cs" >Czech Republic</option>
      
        <option value="dk-da" >Denmark</option>
      
        <option value="ee-et" >Estonia</option>
      
        <option value="fi-fi" >Finland</option>
      
        <option value="fr-fr" >France</option>
      
        <option value="de-de" >Germany</option>
      
        <option value="gr-el" >Greece</option>
      
        <option value="hk-tzh" >Hong Kong</option>
      
        <option value="hu-hu" >Hungary</option>
      
        <option value="in-en" >India</option>
      
        <option value="id-id" >Indonesia</option>
      
        <option value="id-en" >Indonesia (en)</option>
      
        <option value="ie-en" >Ireland</option>
      
        <option value="il-he" >Israel</option>
      
        <option value="it-it" >Italy</option>
      
        <option value="jp-jp" >Japan</option>
      
        <option value="kr-kr" >Korea</option>
      
        <option value="lv-lv" >Latvia</option>
      
        <option value="lt-lt" >Lithuania</option>
      
        <option value="my-ms" >Malaysia</option>
      
        <option value="my-en" >Malaysia (en)</option>
      
        <option value="mx-es" >Mexico</option>
      
        <option value="nl-nl" >Netherlands</option>
      
        <option value="nz-en" >New Zealand</option>
      
        <option value="no-no" >Norway</option>
      
        <option value="pe-es" >Peru</option>
      
        <option value="ph-en" >Philippines</option>
      
        <option value="pl-pl" >Poland</option>
      
        <option value="pt-pt" >Portugal</option>
      
        <option value="ro-ro" >Romania</option>
      
        <option value="ru-ru" >Russia</option>
      
        <option value="xa-ar" >Saudi Arabia</option>
      
        <option value="sg-en" >Singapore</option>
      
        <option value="sk-sk" >Slovakia</option>
      
        <option value="sl-sl" >Slovenia</option>
      
        <option value="za-en" >South Africa</option>
      
        <option value="es-es" >Spain</option>
      
        <option value="es-ca" >Spain (ca)</option>
      
        <option value="se-sv" >Sweden</option>
      
        <option value="ch-de" >Switzerland (de)</option>
      
        <option value="ch-fr" >Switzerland (fr)</option>
      
        <option value="ch-it" >Switzerland (it)</option>
      
        <option value="tw-tzh" >Taiwan</option>
      
        <option value="th-th" >Thailand</option>
      
        <option value="tr-tr" >Turkey</option>
      
        <option value="us-en" >US (English)</option>
      
        <option value="us-es" >US (Spanish)</option>
      
        <option value="uk-en" >United Kingdom</option>
      
        <option value="vn-vi" >Vietnam</option>
      
      </select>
    </div>

    <div class="frm__select frm__select--last">
      <select class="" name="df">
      
        <option value="" selected>Any Time</option>
      
        <option value="d" >Past Day</option>
      
        <option value="w" >Past Week</option>
      
        <option value="m" >Past Month</option>
      
        <option value="y" >Past Year</option>
      
      </select>
    </div>

    </form>

    </div>





<!-- Web results are present -->

  <div>
  <div class="serp__results">
  <div id="links" class="results">

      



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F939982%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dof%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dincluding%2Dthe%2Ddirectory%2Dit"><b>archive</b> - How do I <b>tar</b> a directory of files and folders... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F939982%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dof%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dincluding%2Dthe%2Ddirectory%2Dit">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F939982%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dof%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dincluding%2Dthe%2Ddirectory%2Dit">
                  stackoverflow.com/questions/939982/how-do-i-tar-a-directory-of-files-and-folders-without-including-the-directory-it
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F939982%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dof%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dincluding%2Dthe%2Ddirectory%2Dit">I typically do: <b>tar</b> -czvf my_directory.<b>tar</b>.gz my_directory. What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself?</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10227892%2Ftar%2Dcreate%2Darchive%2Dexclude%2Ddirectories%2Dexcept%2Done">unix - <b>Tar</b>: <b>create</b> <b>archive</b> exclude directories except... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10227892%2Ftar%2Dcreate%2Darchive%2Dexclude%2Ddirectories%2Dexcept%2Done">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10227892%2Ftar%2Dcreate%2Darchive%2Dexclude%2Ddirectories%2Dexcept%2Done">
                  stackoverflow.com/questions/10227892/tar-create-archive-exclude-directories-except-one
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10227892%2Ftar%2Dcreate%2Darchive%2Dexclude%2Ddirectories%2Dexcept%2Done"><b>tar</b> cvfz dir_archive.<b>tar</b>.gz --exclude=dir_archive/mydir/exclude* dir_archive. It is also possible to <b>create</b> a file with names of all the files that you want included and give that list to <b>tar</b> with option -T or...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10773880%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Dfile%2Din%2Dwindows">gzip - How to <b>create</b> <b>tar</b>.gz <b>archive</b> file in Windows? - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10773880%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Dfile%2Din%2Dwindows">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10773880%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Dfile%2Din%2Dwindows">
                  stackoverflow.com/questions/10773880/how-to-create-tar-gz-archive-file-in-windows
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10773880%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Dfile%2Din%2Dwindows"><b>tar</b>.gz file is just a <b>tar</b> file that&#x27;s been gzipped. Both <b>tar</b> and gzip are available for windows. In case it isn&#x27;t clear, in 7zip you must first <b>create</b> the <b>tar</b>; it won&#x27;t even show the option for Gzip if multiple files...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4898056%2Fhow%2Dto%2Dcreate%2Dflat%2Dtar%2Darchive">gzip - How to <b>create</b> flat <b>tar</b> <b>archive</b> - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4898056%2Fhow%2Dto%2Dcreate%2Dflat%2Dtar%2Darchive">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4898056%2Fhow%2Dto%2Dcreate%2Dflat%2Dtar%2Darchive">
                  stackoverflow.com/questions/4898056/how-to-create-flat-tar-archive
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4898056%2Fhow%2Dto%2Dcreate%2Dflat%2Dtar%2Darchive">How can I <b>create</b> <b>archive</b> ps.<b>tar</b>.gz in tmp directory with following structure outfile=$(pwd)/ps.tar;find . -type f | while read file; do <b>tar</b> rf $outfile -C $(dirname $file) $(basename $file) done gzip $outfile.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F40990371%2Fadd%2Da%2Ddirectory%2Dwhen%2Dcreating%2Dtar%2Darchive">linux - add a directory when creating <b>tar</b> <b>archive</b> - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F40990371%2Fadd%2Da%2Ddirectory%2Dwhen%2Dcreating%2Dtar%2Darchive">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F40990371%2Fadd%2Da%2Ddirectory%2Dwhen%2Dcreating%2Dtar%2Darchive">
                  stackoverflow.com/questions/40990371/add-a-directory-when-creating-tar-archive
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F40990371%2Fadd%2Da%2Ddirectory%2Dwhen%2Dcreating%2Dtar%2Darchive">I want to avoid first creating that directory, copying all the files to that directory and then deleting them again only to <b>create</b> the <b>tar</b> <b>archive</b>.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37501791%2Fcreate%2Dtar%2Dgz%2Darchive%2Dand%2Dadd%2Dall%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dparent%2Dfolder">linux - <b>Create</b> <b>tar</b>.gz <b>archive</b> and add all files and... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37501791%2Fcreate%2Dtar%2Dgz%2Darchive%2Dand%2Dadd%2Dall%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dparent%2Dfolder">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37501791%2Fcreate%2Dtar%2Dgz%2Darchive%2Dand%2Dadd%2Dall%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dparent%2Dfolder">
                  stackoverflow.com/questions/37501791/create-tar-gz-archive-and-add-all-files-and-folders-without-parent-folder
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37501791%2Fcreate%2Dtar%2Dgz%2Darchive%2Dand%2Dadd%2Dall%2Dfiles%2Dand%2Dfolders%2Dwithout%2Dparent%2Dfolder">I want to <b>create</b> <b>tar</b>.gz <b>archive</b> with all files and folders, but without parent folder. <b>Create</b> <b>archive</b> and it contains only folder &quot;1&quot; and two php files. How i can do it?</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F51155834%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dwithout%2Dincluding%2Dparent%2Ddirectory">javascript - How to <b>create</b> a <b>tar</b> <b>archive</b> without... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F51155834%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dwithout%2Dincluding%2Dparent%2Ddirectory">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F51155834%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dwithout%2Dincluding%2Dparent%2Ddirectory">
                  stackoverflow.com/questions/51155834/how-to-create-a-tar-archive-without-including-parent-directory
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F51155834%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dwithout%2Dincluding%2Dparent%2Ddirectory">Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more. How to <b>create</b> a <b>tar</b> <b>archive</b> without including parent directory.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3651791%2Ftar%2Dadd%2Dall%2Dfiles%2Dand%2Ddirectories%2Din%2Dcurrent%2Ddirectory%2Dincluding%2Dsvn%2Dand%2Dso%2Don">linux - <b>tar</b>: add all files and directories in current... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3651791%2Ftar%2Dadd%2Dall%2Dfiles%2Dand%2Ddirectories%2Din%2Dcurrent%2Ddirectory%2Dincluding%2Dsvn%2Dand%2Dso%2Don">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3651791%2Ftar%2Dadd%2Dall%2Dfiles%2Dand%2Ddirectories%2Din%2Dcurrent%2Ddirectory%2Dincluding%2Dsvn%2Dand%2Dso%2Don">
                  stackoverflow.com/questions/3651791/tar-add-all-files-and-directories-in-current-directory-including-svn-and-so-on
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3651791%2Ftar%2Dadd%2Dall%2Dfiles%2Dand%2Ddirectories%2Din%2Dcurrent%2Ddirectory%2Dincluding%2Dsvn%2Dand%2Dso%2Don"><b>tar</b> -czf workspace.<b>tar</b>.gz . instead but then I am getting an error because &#x27;.&#x27; has changed while To <b>create</b> the <b>archive</b> in the same directory a --exclude=workspace.<b>tar</b>.gz can be used to exclude the...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27866976%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dtar%2Dor%2Dtar%2Dgz%2Darchive%2Dentirely%2Dfrom%2Dobjects%2Din%2Dmemory%2Dno%2Dfile">How do I <b>create</b> a <b>tar</b> or <b>tar</b>.gz <b>archive</b> entirely from... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27866976%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dtar%2Dor%2Dtar%2Dgz%2Darchive%2Dentirely%2Dfrom%2Dobjects%2Din%2Dmemory%2Dno%2Dfile">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27866976%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dtar%2Dor%2Dtar%2Dgz%2Darchive%2Dentirely%2Dfrom%2Dobjects%2Din%2Dmemory%2Dno%2Dfile">
                  stackoverflow.com/questions/27866976/how-do-i-create-a-tar-or-tar-gz-archive-entirely-from-objects-in-memory-no-file
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27866976%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dtar%2Dor%2Dtar%2Dgz%2Darchive%2Dentirely%2Dfrom%2Dobjects%2Din%2Dmemory%2Dno%2Dfile">What if I don&#x27;t want to use a File object and want to build my <b>tar</b> <b>archive</b> from byte[]. to do something else with your newly created <b>archive</b> */. gzOut = new TarArchiveOutputStream(.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8493015%2Fhow%2Dto%2Dcreate%2Dtar%2Darchive%2Dwithout%2Dsome%2Dfolders">linux - How to <b>create</b> <b>tar</b> <b>archive</b> without some folders? - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8493015%2Fhow%2Dto%2Dcreate%2Dtar%2Darchive%2Dwithout%2Dsome%2Dfolders">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8493015%2Fhow%2Dto%2Dcreate%2Dtar%2Darchive%2Dwithout%2Dsome%2Dfolders">
                  stackoverflow.com/questions/8493015/how-to-create-tar-archive-without-some-folders
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8493015%2Fhow%2Dto%2Dcreate%2Dtar%2Darchive%2Dwithout%2Dsome%2Dfolders">Now I&#x27;m creating <b>tar</b> <b>archive</b> of folder and deleting some folders from it. need <b>create</b> <b>archive</b> only with folders (sub f 1) and (sub f 2) (It is only for example, my really structure have more sub levels).</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4812837%2Fc%2Dlibrary%2Dto%2Dmake%2Dtar%2Dfiles">c++ library to make <b>tar</b> files - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4812837%2Fc%2Dlibrary%2Dto%2Dmake%2Dtar%2Dfiles">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4812837%2Fc%2Dlibrary%2Dto%2Dmake%2Dtar%2Dfiles">
                  stackoverflow.com/questions/4812837/c-library-to-make-tar-files
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F4812837%2Fc%2Dlibrary%2Dto%2Dmake%2Dtar%2Dfiles">Is there any c++ library available which can <b>create</b> <b>tar</b> files ? I have stream of text which I need to break into parts and make small files which should all reside in a <b>tar</b> ball !</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F16824301%2Fcreate%2Dtar%2Darchive%2Dwithout%2Dfolders%2Dwhere%2Donly%2Dthe%2Dname%2Dof%2Dthe%2Dfolder%2Dis%2Dknown%2Dr">unix - <b>Create</b> <b>tar</b> <b>archive</b> without folders where only... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F16824301%2Fcreate%2Dtar%2Darchive%2Dwithout%2Dfolders%2Dwhere%2Donly%2Dthe%2Dname%2Dof%2Dthe%2Dfolder%2Dis%2Dknown%2Dr">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F16824301%2Fcreate%2Dtar%2Darchive%2Dwithout%2Dfolders%2Dwhere%2Donly%2Dthe%2Dname%2Dof%2Dthe%2Dfolder%2Dis%2Dknown%2Dr">
                  stackoverflow.com/questions/16824301/create-tar-archive-without-folders-where-only-the-name-of-the-folder-is-known-r
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F16824301%2Fcreate%2Dtar%2Darchive%2Dwithout%2Dfolders%2Dwhere%2Donly%2Dthe%2Dname%2Dof%2Dthe%2Dfolder%2Dis%2Dknown%2Dr"><b>tar</b> -cvzf 2012.<b>tar</b>.gz 2012/. It worked but included all the folders named @eaDir. My questions is. I would like to exclude all the @eaDir folders from my <b>tar</b> file. I have tried to use the --exclude function...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F6513107%2Fcreate%2Da%2Dtar%2Dfile%2Din%2Da%2Dsubdirectory%2Dof%2Dthe%2Ddirectory%2Dto%2Dbe%2Darchived">unix - <b>Create</b> a <b>tar</b> file in a subdirectory of the directory to be archived</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F6513107%2Fcreate%2Da%2Dtar%2Dfile%2Din%2Da%2Dsubdirectory%2Dof%2Dthe%2Ddirectory%2Dto%2Dbe%2Darchived">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F6513107%2Fcreate%2Da%2Dtar%2Dfile%2Din%2Da%2Dsubdirectory%2Dof%2Dthe%2Ddirectory%2Dto%2Dbe%2Darchived">
                  stackoverflow.com/questions/6513107/create-a-tar-file-in-a-subdirectory-of-the-directory-to-be-archived
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F6513107%2Fcreate%2Da%2Dtar%2Dfile%2Din%2Da%2Dsubdirectory%2Dof%2Dthe%2Ddirectory%2Dto%2Dbe%2Darchived">I&#x27;d like to <b>create</b> a <b>tar</b> file of all the files in a directory minus sub-directory&#x27;s in that directory and place that <b>tar</b> file in one of the sub-directory&#x27;s. For example, I have several...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F58422133%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Din%2Dpython%2Dtar%2Dwithout%2Dinclude%2Dparent%2Ddirectory">How to <b>create</b> <b>tar</b>.gz <b>archive</b> in Python/<b>tar</b> without... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F58422133%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Din%2Dpython%2Dtar%2Dwithout%2Dinclude%2Dparent%2Ddirectory">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F58422133%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Din%2Dpython%2Dtar%2Dwithout%2Dinclude%2Dparent%2Ddirectory">
                  stackoverflow.com/questions/58422133/how-to-create-tar-gz-archive-in-python-tar-without-include-parent-directory
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F58422133%2Fhow%2Dto%2Dcreate%2Dtar%2Dgz%2Darchive%2Din%2Dpython%2Dtar%2Dwithout%2Dinclude%2Dparent%2Ddirectory">How can I <b>create</b> a <b>tar</b>.gz <b>archive</b> which ONLY contains FolderB and FileB, removing the parent directory FolderA? I&#x27;m using Python and I&#x27;m running this code on a Windows machine.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F48604954%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dfrom%2Dan%2Dabsolute%2Dpath%2Dand%2Dpackage%2Dfiles%2Das%2Dif%2Dthey%2Dw">linux - How to <b>create</b> a <b>tar</b> <b>archive</b> from an absolute... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F48604954%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dfrom%2Dan%2Dabsolute%2Dpath%2Dand%2Dpackage%2Dfiles%2Das%2Dif%2Dthey%2Dw">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F48604954%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dfrom%2Dan%2Dabsolute%2Dpath%2Dand%2Dpackage%2Dfiles%2Das%2Dif%2Dthey%2Dw">
                  stackoverflow.com/questions/48604954/how-to-create-a-tar-archive-from-an-absolute-path-and-package-files-as-if-they-w
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F48604954%2Fhow%2Dto%2Dcreate%2Da%2Dtar%2Darchive%2Dfrom%2Dan%2Dabsolute%2Dpath%2Dand%2Dpackage%2Dfiles%2Das%2Dif%2Dthey%2Dw">On Linux, I am trying to <b>create</b> a .<b>tar</b>.gz <b>archive</b> from a different directory, that is I have a bash script that will be executed from a different directory. The script will package the folder, I will give the...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F41139315%2Fhow%2Dcan%2Di%2Dextract%2Da%2Dfile%2Dfrom%2Da%2Dtar%2Darchive%2Dwithout%2Dcreating%2Dthe%2Dsubdirectories">linux - How can I extract a file from a <b>tar</b> <b>archive</b> without creating the...</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F41139315%2Fhow%2Dcan%2Di%2Dextract%2Da%2Dfile%2Dfrom%2Da%2Dtar%2Darchive%2Dwithout%2Dcreating%2Dthe%2Dsubdirectories">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F41139315%2Fhow%2Dcan%2Di%2Dextract%2Da%2Dfile%2Dfrom%2Da%2Dtar%2Darchive%2Dwithout%2Dcreating%2Dthe%2Dsubdirectories">
                  stackoverflow.com/questions/41139315/how-can-i-extract-a-file-from-a-tar-archive-without-creating-the-subdirectories
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F41139315%2Fhow%2Dcan%2Di%2Dextract%2Da%2Dfile%2Dfrom%2Da%2Dtar%2Darchive%2Dwithout%2Dcreating%2Dthe%2Dsubdirectories">I have a compressed <b>tar</b> <b>archive</b> and I want to extract one file from deep in the <b>archive</b> to the current working directory. Is there something better than <b>tar</b>, or a way to extract it without the directory...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F17407047%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dvalid%2Dunix%2Dtar%2Darchive%2Din%2Dwindows%2Dwith%2Djava%2Dapache%2Dcompress">gzip - How do i <b>create</b> a &quot;valid&quot; unix <b>TAR</b> <b>Archive</b> in... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F17407047%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dvalid%2Dunix%2Dtar%2Darchive%2Din%2Dwindows%2Dwith%2Djava%2Dapache%2Dcompress">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F17407047%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dvalid%2Dunix%2Dtar%2Darchive%2Din%2Dwindows%2Dwith%2Djava%2Dapache%2Dcompress">
                  stackoverflow.com/questions/17407047/how-do-i-create-a-valid-unix-tar-archive-in-windows-with-java-apache-compress
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F17407047%2Fhow%2Ddo%2Di%2Dcreate%2Da%2Dvalid%2Dunix%2Dtar%2Darchive%2Din%2Dwindows%2Dwith%2Djava%2Dapache%2Dcompress">I&#x27;m trying to <b>create</b> a &#x27;valid&#x27; <b>tar</b>.gz <b>archive</b> by using the apache commons compress librarys. The created <b>archive</b> will be read by an embedded device and has to be in the same format with the same...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18855850%2Fcreate%2Da%2Dtar%2Dxz%2Din%2Done%2Dcommand">compression - <b>Create</b> a <b>tar</b>.xz in one command - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18855850%2Fcreate%2Da%2Dtar%2Dxz%2Din%2Done%2Dcommand">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18855850%2Fcreate%2Da%2Dtar%2Dxz%2Din%2Done%2Dcommand">
                  stackoverflow.com/questions/18855850/create-a-tar-xz-in-one-command
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18855850%2Fcreate%2Da%2Dtar%2Dxz%2Din%2Done%2Dcommand">I am trying to <b>create</b> a .<b>tar</b>.xz compressed <b>archive</b> in one command. What is the specific syntax for that? I have tried <b>tar</b> cf - file | xz file.<b>tar</b>.xz, but that does not work.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F5695881%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dwithout%2Dretaining%2Dthe%2Ddirectory%2Dstructure"><b>Create</b> a <b>tar</b> <b>archive</b> - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F5695881%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dwithout%2Dretaining%2Dthe%2Ddirectory%2Dstructure">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F5695881%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dwithout%2Dretaining%2Dthe%2Ddirectory%2Dstructure">
                  stackoverflow.com/questions/5695881/how-do-i-tar-a-directory-without-retaining-the-directory-structure
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F5695881%2Fhow%2Ddo%2Di%2Dtar%2Da%2Ddirectory%2Dwithout%2Dretaining%2Dthe%2Ddirectory%2Dstructure">This <b>tars</b> it up, but when I untar the resulting file, it includes the full file structure: the files are in <b>Create</b> a <b>tar</b> <b>archive</b>. <b>tar</b> czf $sourcedir/$backup_dir.<b>tar</b> --directory=$sourcedir WEB-INF en.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18675523%2Fhow%2Dto%2Duse%2Dtar%2Dto%2Darchive%2Dfiles%2Dfrom%2Ddifferent%2Ddirectories%2Dwithout%2Ddirectory%2Dstr">linux - How to use <b>tar</b> to <b>archive</b> files from different... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18675523%2Fhow%2Dto%2Duse%2Dtar%2Dto%2Darchive%2Dfiles%2Dfrom%2Ddifferent%2Ddirectories%2Dwithout%2Ddirectory%2Dstr">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18675523%2Fhow%2Dto%2Duse%2Dtar%2Dto%2Darchive%2Dfiles%2Dfrom%2Ddifferent%2Ddirectories%2Dwithout%2Ddirectory%2Dstr">
                  stackoverflow.com/questions/18675523/how-to-use-tar-to-archive-files-from-different-directories-without-directory-str
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18675523%2Fhow%2Dto%2Duse%2Dtar%2Dto%2Darchive%2Dfiles%2Dfrom%2Ddifferent%2Ddirectories%2Dwithout%2Ddirectory%2Dstr">...to a <b>tar</b> <b>archive</b> (it will <b>create</b> one if it does not exist yet) so you will want to delete the <b>archive</b> if it A possible solution might be to use the ordinary <b>tar</b> command (spitting on its stdout) and then to pipe...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8648872%2Fhow%2Dcan%2Di%2Dprogrammatically%2Dcreate%2Da%2Dtar%2Darchive%2Dof%2Dnested%2Ddirectories%2Dand%2Dfiles">How can I programmatically <b>create</b> a <b>tar</b> <b>archive</b> of... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8648872%2Fhow%2Dcan%2Di%2Dprogrammatically%2Dcreate%2Da%2Dtar%2Darchive%2Dof%2Dnested%2Ddirectories%2Dand%2Dfiles">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8648872%2Fhow%2Dcan%2Di%2Dprogrammatically%2Dcreate%2Da%2Dtar%2Darchive%2Dof%2Dnested%2Ddirectories%2Dand%2Dfiles">
                  stackoverflow.com/questions/8648872/how-can-i-programmatically-create-a-tar-archive-of-nested-directories-and-files
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8648872%2Fhow%2Dcan%2Di%2Dprogrammatically%2Dcreate%2Da%2Dtar%2Darchive%2Dof%2Dnested%2Ddirectories%2Dand%2Dfiles">I want to <b>create</b> a <b>tar</b> <b>archive</b> with a hierarchical directory structure from Python, using strings for the contents of the files. I&#x27;ve read this question , which shows a way of adding strings as files, but not as...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53357800%2Fjava%2Dcreate%2Dtar%2Darchive%2Dwith%2Dentries%2Dof%2Dunknown%2Dsize">io - Java <b>create</b> <b>tar</b> <b>archive</b> with entries of unknown... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53357800%2Fjava%2Dcreate%2Dtar%2Darchive%2Dwith%2Dentries%2Dof%2Dunknown%2Dsize">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53357800%2Fjava%2Dcreate%2Dtar%2Darchive%2Dwith%2Dentries%2Dof%2Dunknown%2Dsize">
                  stackoverflow.com/questions/53357800/java-create-tar-archive-with-entries-of-unknown-size
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53357800%2Fjava%2Dcreate%2Dtar%2Darchive%2Dwith%2Dentries%2Dof%2Dunknown%2Dsize">What is the ideal solution to creating a <b>tar</b> <b>archive</b> with entries of unknown size? <b>Tar</b> files are written as a stream, and metadata (filenames, permissions etc) are written between the file data (i.e...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F7004989%2Fcreating%2Dzip%2Dor%2Dtar%2Dgz%2Darchive%2Dwithout%2Dexec">php - Creating zip or <b>tar</b>.gz <b>archive</b> without exec - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F7004989%2Fcreating%2Dzip%2Dor%2Dtar%2Dgz%2Darchive%2Dwithout%2Dexec">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F7004989%2Fcreating%2Dzip%2Dor%2Dtar%2Dgz%2Darchive%2Dwithout%2Dexec">
                  stackoverflow.com/questions/7004989/creating-zip-or-tar-gz-archive-without-exec
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F7004989%2Fcreating%2Dzip%2Dor%2Dtar%2Dgz%2Darchive%2Dwithout%2Dexec">There is a very simple way to <b>create</b> <b>Tar-archives</b> directly within PHP - you can find a CLASS at sourceforge from Dennis Wronka under LGPL so you can use also in commercial scripts.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8033857%2Ftar%2Darchiving%2Dthat%2Dtakes%2Dinput%2Dfrom%2Da%2Dlist%2Dof%2Dfiles">linux - <b>Tar</b> archiving that takes input from a list of files - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8033857%2Ftar%2Darchiving%2Dthat%2Dtakes%2Dinput%2Dfrom%2Da%2Dlist%2Dof%2Dfiles">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8033857%2Ftar%2Darchiving%2Dthat%2Dtakes%2Dinput%2Dfrom%2Da%2Dlist%2Dof%2Dfiles">
                  stackoverflow.com/questions/8033857/tar-archiving-that-takes-input-from-a-list-of-files
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F8033857%2Ftar%2Darchiving%2Dthat%2Dtakes%2Dinput%2Dfrom%2Da%2Dlist%2Dof%2Dfiles"><b>Tar</b> reports an error, but when you check your <b>tar</b> <b>archive</b>, there are no errors, and all files from the In contrast to the command line, this can <b>create</b> <b>tar</b> <b>archives</b> with hundreds of thousands of files (just...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13477585%2Fcreate%2Dtar%2Darchive%2Dwith%2Dcmake">makefile - <b>Create</b> <b>tar</b> <b>archive</b> with Cmake - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13477585%2Fcreate%2Dtar%2Darchive%2Dwith%2Dcmake">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13477585%2Fcreate%2Dtar%2Darchive%2Dwith%2Dcmake">
                  stackoverflow.com/questions/13477585/create-tar-archive-with-cmake
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13477585%2Fcreate%2Dtar%2Darchive%2Dwith%2Dcmake">Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more. <b>Create</b> <b>tar</b> <b>archive</b> with Cmake.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21790843%2Fhow%2Dto%2Drename%2Dfiles%2Dyou%2Dput%2Dinto%2Da%2Dtar%2Darchive%2Dusing%2Dlinux%2Dtar">how to rename files you put into a <b>tar</b> <b>archive</b> using linux <b>&#x27;tar&#x27;</b></a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21790843%2Fhow%2Dto%2Drename%2Dfiles%2Dyou%2Dput%2Dinto%2Da%2Dtar%2Darchive%2Dusing%2Dlinux%2Dtar">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21790843%2Fhow%2Dto%2Drename%2Dfiles%2Dyou%2Dput%2Dinto%2Da%2Dtar%2Darchive%2Dusing%2Dlinux%2Dtar">
                  stackoverflow.com/questions/21790843/how-to-rename-files-you-put-into-a-tar-archive-using-linux-tar
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21790843%2Fhow%2Dto%2Drename%2Dfiles%2Dyou%2Dput%2Dinto%2Da%2Dtar%2Darchive%2Dusing%2Dlinux%2Dtar">I&#x27;m trying to <b>create</b> a <b>tar</b> <b>archive</b> with a couple files, but rename those files in the <b>archive</b>. Right now I have something like this: <b>tar</b> -czvf file1 /some/path/to/file2 file3 etc. But I&#x27;d like to do something like</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37567680%2Fadd%2Dfile%2Dto%2Dtar%2Darchive%2Dwithout%2Dsaving%2Dit%2Dfirst">python - Add file to <b>tar</b> <b>archive</b> without saving it first - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37567680%2Fadd%2Dfile%2Dto%2Dtar%2Darchive%2Dwithout%2Dsaving%2Dit%2Dfirst">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37567680%2Fadd%2Dfile%2Dto%2Dtar%2Darchive%2Dwithout%2Dsaving%2Dit%2Dfirst">
                  stackoverflow.com/questions/37567680/add-file-to-tar-archive-without-saving-it-first
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F37567680%2Fadd%2Dfile%2Dto%2Dtar%2Darchive%2Dwithout%2Dsaving%2Dit%2Dfirst">Is there a possibility to <b>create</b> a file directly in a <b>tar</b> <b>archive</b>? Context: I have a method which <b>creates</b> content of some kind as String.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F57817073%2Fhow%2Dto%2Dencrypt%2Dafter%2Dcreating%2Dtar%2Darchive">bash - How to Encrypt after creating <b>TAR</b> <b>Archive</b> - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F57817073%2Fhow%2Dto%2Dencrypt%2Dafter%2Dcreating%2Dtar%2Darchive">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F57817073%2Fhow%2Dto%2Dencrypt%2Dafter%2Dcreating%2Dtar%2Darchive">
                  stackoverflow.com/questions/57817073/how-to-encrypt-after-creating-tar-archive
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F57817073%2Fhow%2Dto%2Dencrypt%2Dafter%2Dcreating%2Dtar%2Darchive"># <b>tar</b> --compare --file=ArchiveVerify.<b>tar</b> compare <b>tar</b>: This does not look like a <b>tar</b> <b>archive</b> <b>tar</b>: Skipping to next header <b>tar</b>: compare: Not found in <b>archive</b> <b>tar</b>: Exiting with failure status due to previous errors.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2239655%2Fhow%2Dcan%2Dfiles%2Dbe%2Dadded%2Dto%2Da%2Dtarfile%2Dwith%2Dpython%2Dwithout%2Dadding%2Dthe%2Ddirectory%2Dhi"><b>tar</b> - How can files be added to a tarfile with Python... - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2239655%2Fhow%2Dcan%2Dfiles%2Dbe%2Dadded%2Dto%2Da%2Dtarfile%2Dwith%2Dpython%2Dwithout%2Dadding%2Dthe%2Ddirectory%2Dhi">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2239655%2Fhow%2Dcan%2Dfiles%2Dbe%2Dadded%2Dto%2Da%2Dtarfile%2Dwith%2Dpython%2Dwithout%2Dadding%2Dthe%2Ddirectory%2Dhi">
                  stackoverflow.com/questions/2239655/how-can-files-be-added-to-a-tarfile-with-python-without-adding-the-directory-hi
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2239655%2Fhow%2Dcan%2Dfiles%2Dbe%2Dadded%2Dto%2Da%2Dtarfile%2Dwith%2Dpython%2Dwithout%2Dadding%2Dthe%2Ddirectory%2Dhi">For some reason in my machine this <b>creates</b> only <b>tar</b> <b>archive</b> with empty files (the files are there Example: you want to <b>archive</b> a dir repo/a.git/ to a <b>tar</b>.gz file, but you rather want the tree root in the...</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  



  


            <div class="result results_links results_links_deep web-result ">


          <div class="links_main links_deep result__body"> <!-- This is the visible part -->

          <h2 class="result__title">
          
            <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F20849299%2Fhow%2Ddoes%2Dtar%2Dread%2Dfiles%2Dto%2Dcreate%2Dan%2Darchive">linux - How does <b>tar</b> read files to <b>create</b> an <b>archive</b>? - Stack Overflow</a>
          
          </h2>

      

            <div class="result__extras">
                <div class="result__extras__url">
                  <span class="result__icon">
                    
                      <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F20849299%2Fhow%2Ddoes%2Dtar%2Dread%2Dfiles%2Dto%2Dcreate%2Dan%2Darchive">
                        <img class="result__icon__img" width="16" height="16" alt=""
                          src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
                      </a>
                  
                  </span>

                  <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F20849299%2Fhow%2Ddoes%2Dtar%2Dread%2Dfiles%2Dto%2Dcreate%2Dan%2Darchive">
                  stackoverflow.com/questions/20849299/how-does-tar-read-files-to-create-an-archive
                  </a>

                  

                </div>
            </div>

            
                  <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F20849299%2Fhow%2Ddoes%2Dtar%2Dread%2Dfiles%2Dto%2Dcreate%2Dan%2Darchive">What system call does <b>tar</b> use to get the content of files that it uses to <b>create</b> an <b>archive</b>? I tried using strace to see the call, but it never calls open on the file.</a>
            

            <div style="clear: both"></div>
          </div>

        </div>

  




        
        
                <div class="nav-link">
        <form action="/html/" method="post">
          <input type="submit" class='btn btn--alt' value="Next" />
          <input type="hidden" name="q" value="site:stackoverflow.com create tar archive" />
          <input type="hidden" name="s" value="30" />
          <input type="hidden" name="nextParams" value="" />
          <input type="hidden" name="v" value="l" />
          <input type="hidden" name="o" value="json" />
          <input type="hidden" name="dc" value="31" />
          <input type="hidden" name="api" value="/d.js" />
          <input type="hidden" name="vqd" value="3-1404113627039173184665222675522634076-43159504354749059782740578017628419813" />

            
        
          <input name="t" value="hj" type="hidden" />
            
        
          <input name="kl" value="wt-wt" type="hidden" />
            
            
            
            
            
        </form>
                </div>
        



        <div class=" feedback-btn">
            <a rel="nofollow" href="/feedback.html" target="_new">Feedback</a>
        </div>
        <div style="clear:both;"></div>
  </div>
  </div> <!-- links wrapper //--> 

    



    </div>
  </div>




    <div id="bottom_spacing2"></div>

    
      <img src="/t/sl_h"/>
    
</body>
</html>
